package com.zz.spring_boot_mybatis.controller;

import com.zz.spring_boot_mybatis.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Value("${personName}")
    private String name;

    @Autowired
    private User user;

    @GetMapping("hello")
    public String hello(){
        return "helloWorld!!! ";
    }

    @GetMapping("getUser")
    public User getUser(){
        return user;
    }





}
